from werkzeug.security import generate_password_hash, check_password_hash


class Auth:
    def __init__(self, password, hash_pass=None):
        self.password = password
        self.hash_pass = hash_pass

    def encrypt_pass(self):
        return generate_password_hash(self.password)

    def check_pass(self, check_pass):
        hash_pass = generate_password_hash(self.password)
        return check_password_hash(hash_pass, check_pass)
